<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function fn1(name) {
      this.name = name
      this.fn1 = function() {
        console.log(this.name);
      }
    }
    fn1.prototype.fn2 = function() {
      console.log('实例2');
    }
    console.log(fn1.__proto__);
    let a = new fn1('fn1')
    console.log(a);
    a.fn1()
    a.fn2()
    let b = new fn1('fn2')
    b.fn1()
    b.fn2()
    let obj = {}
    console.log(obj);
  </script>
</body>
</html>